<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>接种记录</title>
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
</head>

<body>
    <table id="jiezhong" lay-filter="test">

    </table>
    <script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script>
        layui.use('table', function () {
            var table = layui.table;
            table.render({
                elem: '#jiezhong',
                //http://110.42.199.36:8081/vaccination/selectAllVac
                url: 'http://110.42.199.36:8081/vaccination/selectAllVac',
                parseDate:function (res){
                    console.log("parseDate")
                    console.log(res);
                    return {
                        "code":res.status,
                        "msg":res.message,
                        "count":res.total,
                        "data":res.data
                    }
                },
                response: {
                    statusName: 'status' //规定数据状态的字段名称，默认：code
                    ,statusCode: 200 //规定成功的状态码，默认：0
                    ,msgName: 'msg' //规定状态信息的字段名称，默认：msg
                    ,countName: 'count' //规定数据总数的字段名称，默认：count
                    ,dataName: 'data' //规定数据列表的字段名称，默认：data
                },
                cols: [[
                    { field: 'uid', title: '接种用户id', width: '120' },
                    { field: 'did', title: '接种疫苗id', width: '120' },
                    { field: 'time', title: '接种时间', width: '200' },
                    { field: 'dose', title: '接种剂次', width: '120' },
                    { field: 'vacc_unit', title: '接种单位', width: '200' },
                    { field: 'enterprise', title: '生产企业', width: '120' },
                    { field: 'batch_number', title: '疫苗批号', width: '120' },
                ]]
            });
        });
    </script>
</body>

</html>